<%--
  Created by IntelliJ IDEA.
  User: 张瑶瑶
  Date: 2024/12/12
  Time: 18:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>登录</title>
</head>
<body>
    <!-- 登录表单容器 -->
    <div class="login-container">
        <!-- 顶部背景区域 -->
        <div class="baground"></div>
        <!-- 登录表单 -->
        <form action="/untitled_war_exploded/login" method="post">
            <!-- 输入区域 -->
            <div class="register-input">
                <!-- 用户名输入行 -->
                <div class="row">
                    <span>用户名</span>
                    <input type="text" id="userName" name="userName">
                </div>
                <!-- 密码输入行 -->
                <div class="row">
                    <span>密码</span>
                    <input type="password" id="password" name="password">
                </div>
            </div>
            <!-- 按钮区域 -->
            <div class="div-bt-login">
                <button class="bt-login" type="submit">登录账号</button>
                <button class="bt-register" type="button">注册账号</button>
            </div>
        </form>
    </div>

    <!-- 样式定义 -->
    <style>
        /* 页面整体样式 */
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            background-color: #FFE8D6; /* 浅灰色背景，常用于商城主题 */
            margin-bottom: 100px;
        }

        /* 登录容器样式 */
        .login-container {
            width: 430px;
            height: 330px;
            background-color: #ffffff;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            transition: transform 0.3s ease;
            align-items: center;
        }

        /* 顶部背景样式 */
        .baground {
            width: 100%;
            height: 130px;
            background-color: #365EFF;
        }

        /* 输入区域样式 */
        .register-input {
            margin-left: 40px;
            width: 300px;
            margin-top: 50px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        /* 输入行样式 */
        .row {
            display: flex;
            align-items: center;
            margin-bottom: 5px;
        }

        .row span {
            width: 60px;
            margin-right: 10px;
        }

        /* 登录容器悬停效果 */
        .login-container:hover {
            transform: translateY(-5px);
        }

        /* 按钮容器样式 */
        .div-bt-login {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }

        /* 注册按钮样式 */
        .bt-register {
            margin-top: 10px;
            width: 100px;
            height: 35px;
            font-size: 14px;
            background-color: transparent;
            color: #26a69a;
            border: none;
            cursor: pointer;
        }

        /* 登录按钮样式 */
        .bt-login {
            width: 320px;
            height: 45px;
            background-color: #26a69a;
            color: white;
            border: none;
            border-radius: 5px;
            transition: background-color 0.3s ease;
            align-items: center;
            margin-top: 10px;
        }

        /* 登录按钮悬停效果 */
        .bt-login:hover {
            background-color: #00796b;
        }

        /* 选项区域样式 */
        .options {
            align-items: center;
            text-align: center;
            margin-bottom: 5px;
        }

        .options label {
            color: #555;
        }
    </style>

    <script>
        document.querySelector('.bt-register').addEventListener('click', function() {
            window.location.href = 'register.jsp';
        });
    </script>
</body>
</html>
